package com.jinghao.ctws.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jinghao.core.common.controller.JingHaoBaseController;
import com.jinghao.ctws.entity.CwvVideoPlayConfig;
import com.jinghao.ctws.service.ICwvVideoPlayConfigService;

@Controller
@Scope("prototype")
@RequestMapping(value = "/app/ctws/CwvVideoPlayConfig")
public class CwvVideoPlayConfigController extends JingHaoBaseController<CwvVideoPlayConfig> {
	//==================定制内容开始======================
//在这里修改代码
	
	/**
	 * 根据查询视频播放配置信息
	 * @param  
	 */
	@ResponseBody	
	@RequestMapping(value = "/listCwvVideoPlayConfig",method = RequestMethod.GET) 
	public Map<String, Object> listCwvVideoPlayConfig(@ModelAttribute("model") CwvVideoPlayConfig model){
		this.getCwvVideoPlayConfigService().listCwvVideoPlayConfig(model);
        return model.getSingleJson();   
	} 
	/**
	 * 添加或修改视频播放配置信息
	 * @param  
	 */
	@ResponseBody
	@RequestMapping(value = "/addCwvVideoPlayConfig",method = RequestMethod.POST) 
	public Map<String, Object> addCwvVideoPlayConfig(@ModelAttribute("model") CwvVideoPlayConfig model){
		this.getCwvVideoPlayConfigService().addCwvVideoPlayConfig(model);
        return model.getJson();   
	} 
	//==================定制内容结束======================

	@Autowired
	public void setCwvVideoPlayConfigService(ICwvVideoPlayConfigService cwvVideoPlayConfigService) {
		super.setIJingHaoBaseService(cwvVideoPlayConfigService);
	}

	public ICwvVideoPlayConfigService getCwvVideoPlayConfigService() {
		return (ICwvVideoPlayConfigService) super.getIJingHaoBaseService();
	}
}
